<template>
     <div class="form-container">
      <el-table :data="list"   v-loading="loading">

      <el-table-column label="来源" align="center" prop="type">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.from_type" :value="scope.row.type" />
        </template>
      </el-table-column>

      <el-table-column label="场景" align="center" prop="op" >
      <template slot-scope="scope">
          <dict-tag :options="dict.type.service_op" :value="scope.row.op" />
        </template>
      </el-table-column>

      <el-table-column label="封面" align="center" prop="title">
        <template slot-scope="scope">
          <image-preview :src="scope.row.image" :width="50" :height="50" /> 
        </template>
      </el-table-column>

      
      <el-table-column label="标题" align="center" prop="title" />
      
      <el-table-column label="时间" align="center" prop="create_time" >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.create_time, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
    </el-table> 

    <pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize"
      @pagination="getList" />
        </div>
</template>

<script>
export default {
  dicts: ['from_type','service_op'],
	data() {
    return {
      pageNum: 1,
      pageSize: 10,
    }
	},
	name: 'teamList',
    props: {
    /* 编辑器的内容 */
    list: {
      type: Array,
      default: [],
    },
    loading: {
      type: Boolean,
      default: true,
    },
    total: {
      type: Number,
      default: 0,
    },


  },
	methods: {
    getList() {
    this.$emit('pageChange')
  },
	},

	computed: {
	
	}
}
</script>
